from django.shortcuts import render,render_to_response
from django.http import HttpResponse

# Create your views here.


def Index(request):
    return HttpResponse('<h1>hello web</h1>')



def Auth(request):
    print request.GET
    passwd,username = request.GET['passwd'],request.GET['username']
    if username == 'gzl' and passwd == 'gzl':
        return HttpResponse('login sucess')
    else:
        return HttpResponse('login fail')


def Login(request):
    return render_to_response('index.html')

def Menu(request):
    regin_dir = {
        'ShanDong':{'JinNan':['JiNing','kid'],
                    'Dezhou':['linux','mac']

                    },
        'HeNan':{'xinyong':['sdfsdf']}

    }

    import json
    return HttpResponse(json.dumps(regin_dir))


